compare byte stream and character stream in java